package com.china.zhuoyue.ui.activity.user

import androidx.recyclerview.widget.LinearLayoutManager
import com.china.zhuoyue.R
import com.china.zhuoyue.bean.AuthList
import com.china.zhuoyue.databinding.ActivityReceivingAddressBinding
import com.china.zhuoyue.databinding.ItemReceivingAddressBinding
import com.china.zhuoyue.ui.base.BaseActivity
import com.china.zhuoyue.ui.base.BaseRecyclerAdapter
import com.china.zhuoyue.ui.base.BaseViewHolder

class ReceivingAddressActivity : BaseActivity<ActivityReceivingAddressBinding>() {
    override fun initView() {
        loadView {
            rvList.adapter = ReceivingAddressAdapter().apply {
                datas = ReceivingAddressAdapter.AUTH_LIST
            }
            rvList.layoutManager = LinearLayoutManager(mThis)
        }
    }
}


class ReceivingAddressAdapter : BaseRecyclerAdapter<BaseViewHolder<ItemReceivingAddressBinding>, AuthList>() {
    companion object {
        val AUTH_LIST = mutableListOf<AuthList>().apply {
            add(AuthList(R.string.text_auth_owner, R.string.text_auth_owner_desc, 1))
            add(AuthList(R.string.text_auth_staff, R.string.text_auth_staff_desc, 1))
            add(AuthList(R.string.text_auth_user, R.string.text_auth_user_desc, 0))
        }
    }

    override fun onBindViewHolder(holder: BaseViewHolder<ItemReceivingAddressBinding>, bean: AuthList, position: Int) {
        holder.vb.apply {
        }
    }
}